// components/listview/item/SessionListItem.js
let app = getApp();
let globalStore = app.globalData.globalStore;

Component({
  /**
   * 组件的属性列表
   */
  properties: {
    avatar:{
      type: String,
      value: ''
    },
    name:{
      type: String,
      value: ''
    },
    body:{
      type: String,
      value: ''
    },
    unread:{
      type: Number,
      value: 0
    },
    data:{
      type: Object,
      value: {}
    }
  },

  /**
   * 组件的初始数据
   */
  data: {

  },

  /**
   * 组件的方法列表
   */
  methods: {
    pressItem:function (e) {
      const category = 'friend';
      globalStore.selectChartContent(category, this.data.data, '');
      wx.navigateTo({
        url: '/pages/chatwin/chatwin?category=' + category,
      });
    }
  }
})
